<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Document</title>
</head>
<body>
  <div id="test">
    <p :style="{fontSize:mySize+'px','background-color':bgColor}">style动态绑定</p>
  </div>

  <script src="../js/vue.js"></script>
  <script>
    const vm = new Vue({
      el: "#test",
      data: {
        mySize:50,
        bgColor:'pink'
      }
    })

    setTimeout(()=>{
      vm.mySize = 30
      vm.bgColor = 'deeppink'
    },2000)
  </script>
</body>
</html>